/************************************************************************/
/*																		*/
/*					Project 2		JSU WORD							*/
/*																		*/
/*							Team 2										*/	
/*																		*/
/*			El Capitan: David Buckner									*/
/*			Recorder:		 Phyllisia Gaines							*/
/*			Average Joe:	 Drew White									*/
/*																		*/
/*			This program is an imitation of the application				*/
/*			Microsoft Word. It includes the ability to load in			*/
/*			a saved document and edit its content and formatting.		*/
/*																		*/
/************************************************************************/



#include <iostream>

#include <fstream>

#include "display.h"

using namespace std;

/************************************************************************/

void main()
{		
	Display wordDisplay;

	char choice=' ';

	while(choice!='x')
	{
		system("cls");
		wordDisplay.DrawArray();


		cout << endl << " What would you like to do? " << endl << endl;

		cout << " Add a word	\t(a) \t Remove text		(r) "<< endl;

		cout << " Change a character	(c) \t Change a word		(w) "<< endl;

		cout << " Change formatting	(f) \t Export to output.jsd	(e) " << endl;

		cout << " Save changes to text	(s) \t Exit program		(x) " << endl;

		cin>>choice;

		switch (choice)
		{
			case 'a':	{
							wordDisplay.AddText();
							break;
						}


			case 'r':	{
							wordDisplay.DeleteText();
							break;
						}
			case 'c':	{
							wordDisplay.ChangeCharacter();
							break;
						}


			case 'w':	{
							wordDisplay.ChangeWord();
							break;
						}


			case 'f':	{
							wordDisplay.ChangeFormat();
							break;
						}

			case 's':	{
							wordDisplay.SaveFile();
							break;
						}


			case 'x':	{
							wordDisplay.DrawOutputFile();
							wordDisplay.CloseFile();
							break;
						}


		}					


	}


}